package com.car.loan.project.xr.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.car.loan.project.xr.domain.LoanInsurance;
import java.util.Optional;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @author huangding
 * @description
 * @date 2020/2/9 19:32
 */
@Repository
public interface LoanInsuranceMapper extends BaseMapper<LoanInsurance> {

    @Select("select * from xr_loan_insurance where loan_id =#{loanId} and status = 1")
    Optional<LoanInsurance> selectByLoanId(@Param("loanId") long loanId);
}
